<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        console.log(`//`)

        //字符串对象
        //number对象
        var obj = new Object('3')

        console.log(obj);
        console.log(obj + 1);
        console.log(typeof obj);

        var num ='1122112.2213213621qq';

        //字符串转number方法
        //string 转换number，保留浮点数

        console.log(parseFloat(num));

        //string转换为number，只保留整数

        console.log(parseInt(num));

        // //特殊点
        // console.log(parseFloat('a'))
        // console.log(parseInt('a'))

        // //10a * 100
        // console.log(parseFloat('10a'))
        // console.log(parseInt('10a'))

        //Number只能转换能被接受的字符串
        console.log(Number(num))

    </script>
</body>
</html>